if (autoRequestScreenCapture()) {
    let selectors = id("com.ss.android.ugc.aweme:id/b3n").visible(true);
    if (selectors) {
        var imageX = image.captureFullScreen();
        let x = getNodeCenterX(selectors);
        let y = getNodeCenterY(selectors);
        let width = getNodeWidth(selectors);
        let height = getNodeHeight(selectors);

        var color = image.pixelInImage(imageX, x, y);
        logd('点赞组件中心点颜色值：' + color);
        // 已点赞：-310158
        // 未点赞：-986896，-460295

        if (color != -310158) {
            logd('未点赞');
        } else {
            logd('已点赞');
        }
    }
} else {
    loge('初始化截图权限失败！');
}

//前面课程封装的几个自定义函数，别忘了和这段代码放在一起。